package com.atmilan.quartz.model.request;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.atmilan.quartz.utils.jackyun.BaseRequestBizData;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public class JackyunGoodsStockOutRequest extends BaseRequestBizData {
   
    private String outWarehouseCode;
    private Integer outType;
    private String relDataId;
    private String applyDepartName;
    private Date applyDate;
    private String operator;
    private String source;
    private List<StockOutDetailView> stockOutDetailViews;
    
    @Data
    public static class StockOutDetailView {
        private String skuBarcode;
        private Integer relDetailId;
        private BigDecimal skuCount;
        private String isCertified;

    	@Override
    	public int hashCode() {
    		String str = skuBarcode + relDetailId + skuCount + isCertified;
    		return str.hashCode();
    	}

    	@Override
    	public boolean equals(Object obj) {
    		StockOutDetailView view = (StockOutDetailView)obj;
    		return skuBarcode.equals(view.skuBarcode);
    	}
    }

}
